package fr.labri.macchiato.framework.business.service;

import fr.labri.macchiato.framework.business.finder.BusinessEntityFinder;
import fr.labri.macchiato.framework.business.finder.ProductFinder;

/**
 * Abstract Factory for the services. <br>
 * Known implementing classes are {@link PersistedServiceFactory} and
 * {@link TransientServiceFactory} which purpose is respectively to create
 * services which persists the entities and services which does not.
 * 
 * @author Michelle AVOMO
 * 
 */

public interface ServiceFactory {

	/**
	 * Creates a new {@link ProjectService} which will use the given
	 * {@link ProductFinder} to fetch products
	 * 
	 * @param productFinder
	 * @return A new {@link ProjectService}
	 */
	public ProjectService newProjectService(ProductFinder productFinder);

	/**
	 * 
	 * @return a new {@link PreferencesService}
	 */
	public PreferencesService newPreferencesService();

	/**
	 * Creates a new @link BusinessEntityservice which will be used to fetch
	 * companies in th db
	 * 
	 * @param finder
	 * @return the {@link BusinessEntityService}
	 * 
	 */
	public BusinessEntityService newBusinessEntityService(
			BusinessEntityFinder finder);

}
